/*
 * @Author: PC9527\Jack sophia2152@qq.com
 * @Date: 2023-08-03 17:04:24
 * @LastEditors: PC9527\Jack sophia2152@qq.com
 * @LastEditTime: 2023-08-07 15:42:42
 * @Description:
 */
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';

export type UsernameParams = BasicPageParams & {
  username?: string;
  true_name?: string;
};

export type AdminParams = {
  id?: number;
  username: string;
  password: string;
  true_name?: string;
  face?: string;
  phone?: string;
  email?: string;
  email_status?: number;
  birthday?: Date;
  last_ip?: string;
  last_time?: Date;
  status?: number;
  roles?: Array<number>;
};

export type RoleParams = {
  role_name?: string;
  status?: string;
};

export type RolePageParams = BasicPageParams & RoleParams;

export type DeptParams = {
  deptName?: string;
  status?: string;
};

export type MenuParams = {
  keyword?: string;
  status?: string;
};

export interface UsernameListItem {
  id: string;
  username: string;
  email: string;
  true_name: string;
  role: number;
  last_time: string;
  remark: string;
  status: number;
}

export interface DeptListItem {
  id: string;
  orderNo: string;
  createTime: string;
  remark: string;
  status: number;
}

export interface MenuListItem {
  id: string;
  orderNo: string;
  createTime: string;
  status: number;
  icon: string;
  component: string;
  permission: string;
}

export interface RoleListItem {
  id: string;
  roleName: string;
  roleValue: string;
  status: number;
  orderNo: string;
  createTime: string;
}

/**
 * @description: Request list return value
 */
export type UsernameListGetResultModel = BasicFetchResult<UsernameListItem>;

export type DeptListGetResultModel = BasicFetchResult<DeptListItem>;

export type MenuListGetResultModel = BasicFetchResult<MenuListItem>;

export type RolePageListGetResultModel = BasicFetchResult<RoleListItem>;

export type RoleListGetResultModel = RoleListItem[];
